
public class InvoiceItem {
	String id;
	String desc;
	int qty;
	double unitPrice;
	
	public InvoiceItem(String id,String desc,int  qty,double unitPrice){
		this.id=id;
		this.desc=desc;
		this.qty=qty;
		this.unitPrice=unitPrice;
	}
	
	public String getId(){
		return this.id;
	}
	 public String getDesc(){
		return desc;
		 
	 }
	 public int getQty(){
		 return qty;
	 }
	 public void setQty(int qty){
		 this.qty=qty;
	 }
	
	 public double getUnitPrice(){
		 return unitPrice;
	 }

	public void setUnitPrice(double unitPrice) {
		this.unitPrice = unitPrice;
	}
	 
	public double getTotal(){
		return unitPrice*qty;
	}
	
	public String toString(){
		
		StringBuilder sb = new StringBuilder();
		sb.append("InvoiceItem [ id=").append(id);
		sb.append(",desc=").append(desc);
		sb.append(",qty=").append(qty);
		sb.append(",unitPrice=").append(unitPrice);
		return sb.toString();
	}
	
	
	
	
	
}
